home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 029a / lite411q.zip / LDEMO4.BAS < prev    next >
BASIC Source File  |  1991-07-25  |  5KB  |  160 lines

  1. '============================================================================
  2. '
  3. '                      LDEMO4.BAS - LITE Window Demo #4
  4. '                         ProWindows(tm) LITE 4.00
  5. '              (c) Copyright 1988-1991 DSE Software Publishing
  6. '
  7. '==========================================================================
  8. '
  9. '    To make use of this demonstration program, you must load BASIC
  10. '    EXATCLY as follows:
  11. '
  12. '         QB LDEMO1 /AH /L LITEDEMO               (for QuickBASIC)
  13. '         QBX LDEMO1 /AH /EA /L LITEDEMO          (for BASIC PDS 7)
  14. '
  15. '==========================================================================
  16.  
  17. REM $DYNAMIC
  18.  
  19. ' =======================================================================
  20. ' These constants should be defined in ALL applications, whether or not
  21. ' they are actually used.  If a particular module will not be used, define
  22. ' the appropraite as '0'.
  23. ' =======================================================================
  24.  
  25. CONST WINMEMSIZE% = 8191           ' Window memory, used by 'VirMem%()'
  26. CONST SCRNMEMSIZE% = 4096          ' Screen storage memory, used by 'scrn%()'
  27. CONST MAXWINDOWS% = 30             ' Maximum number of windows
  28.  
  29. ' =======================================================================
  30. ' INCLUDE modules should follow
  31. ' =======================================================================
  32.  
  33. REM $INCLUDE: 'lite.bi'
  34.  
  35. CLEAR , , 4096                     ' Set aside additional stack space
  36.  
  37. ' =======================================================================
  38. ' Be sure to DIM your variables
  39. ' =======================================================================
  40.  
  41. DIM SHARED VirMem(WINMEMSIZE) AS INTEGER
  42. DIM SHARED scrn(SCRNMEMSIZE) AS INTEGER
  43. DIM SHARED vcb(MAXWINDOWS) AS vircb
  44. DIM SHARED wcb(MAXWINDOWS) AS wincb
  45. DIM SHARED wcbndx(MAXWINDOWS) AS INTEGER
  46.  
  47. ' =======================================================================
  48. ' Program initialization code
  49. ' =======================================================================
  50.  
  51.     ReCycleMode 1                           ' enable "Video Recycling" saves 24K
  52.  
  53.     InitPro                                 ' initialize ProWindows
  54.  
  55.     MouseInstalled = CheckMouse(buttons)
  56.     
  57. ' =======================================================================
  58. ' Your code goes here
  59. ' =======================================================================
  60.  
  61. ' =======================================================================
  62. ' Remove next two "REM" statements for simulated monochrome mode
  63. ' =======================================================================
  64.  
  65.     REM SetBWmode ENABLE
  66.     REM SetMonitorColor 6   '1 is blue, 2 is green, 6 is amber, etc...
  67.  
  68. MainMenu:
  69.     
  70.     FillScreen 1, 1, 25, 80, attr(0, 1), 176, SNOW
  71.  
  72.     Notice
  73.     NoticeWin = CurrentWindow
  74.     
  75.     OpenWindow 1, 10, 40, attr(7, 4), 1, 1, 1, SELECTABLE
  76.     OpenWindow 2, 10, 40, attr(7, 5), 1, 1, 2, SELECTABLE
  77.     OpenWindow 3, 10, 40, attr(7, 6), 1, 1, 3, SELECTABLE
  78.     OpenWindow 4, 10, 40, attr(7, 1), 1, 1, 4, SELECTABLE
  79.     OpenWindow 5, 10, 40, attr(11, 2), 1, 1, 5, SELECTABLE
  80.     OpenWindow 6, 10, 40, attr(14, 3), 1, 1, 6, SELECTABLE
  81.     OpenWindow 7, 10, 40, attr(15, 7), 1, 1, 7, SELECTABLE
  82.     OpenWindow 8, 10, 40, attr(7, 1), 1, 1, 8, SELECTABLE
  83.     OpenWindow 9, 10, 40, attr(10, 2), 1, 1, 9, SELECTABLE
  84.     OpenWindow 10, 10, 40, attr(15, 3), 1, 1, 10, SELECTABLE
  85.     OpenWindow 11, 10, 40, attr(7, 4), 1, 1, 11, SELECTABLE
  86.  
  87.     FOR WinNo = 1 TO 11
  88.         SetWindow WinNo
  89.         TitleWindow 1, " Window " + STR$(WinNo) + CHR$(255)
  90.         wcprint 4, "This is ZOOM style" + STR$(WinNo)
  91.     NEXT
  92.     
  93.     SoundMode = GLISANDO          ' this is what makes the "chirp" sound
  94.     SetZoomSpeed 25               ' slow down the zooms a little
  95.  
  96.     DisplayWindow 1, 0, 0, 10, 40
  97.     SLEEP 1
  98.     
  99.     DisplayWindow 2, 1, 1, 10, 40
  100.     DisplayWindow 9, 15, 41, 10, 40
  101.     SLEEP 1
  102.  
  103.     DisplayWindow 4, 1, 41, 10, 40
  104.     DisplayWindow 7, 15, 1, 10, 40
  105.     SLEEP 1
  106.  
  107.     DisplayWindow 3, 1, 0, 10, 40
  108.     DisplayWindow 8, 15, 0, 10, 40
  109.     SLEEP 1
  110.  
  111.     DisplayWindow 5, 0, 1, 10, 40
  112.     DisplayWindow 6, 0, 41, 10, 40
  113.     SLEEP 1
  114.     
  115.     DisplayWindow 10, 5, 10, 10, 40
  116.     DisplayWindow 11, 11, 35, 10, 40
  117.     SLEEP 1
  118.  
  119.     SoundMode = DISABLE
  120.  
  121.     PopWindow 0, 0, 6, 50, 112, 1, 1, 1
  122.     wcprint 2, "Press ANY Key to MOVE windows"
  123.     cwcprint 3, 127, "(Notice Where Each Window Is)"
  124.     WHILE INKEY$ = "": WEND
  125.     RemoveWindow
  126.  
  127.     RefreshMode DISABLE           ' make the moves go faster
  128.  
  129.     MoveWindow 11, 0, 0
  130.     MoveWindow 10, 1, 1
  131.     MoveWindow 9, 1, 0
  132.     MoveWindow 8, 1, 41
  133.     MoveWindow 7, 0, 1
  134.     MoveWindow 6, 0, 41
  135.     MoveWindow 5, 15, 1
  136.     MoveWindow 4, 15, 0
  137.     MoveWindow 3, 15, 41
  138.     MoveWindow 2, 5, 10
  139.     MoveWindow 1, 11, 35
  140.  
  141.     RefreshMode ENABLE                 ' re-enable the refresh
  142.  
  143.     RefreshAllWindows                  ' refresh the display
  144.  
  145.     PopWindow 0, 0, 5, 50, 112, 1, 1, 1
  146.     wcprint 2, "Press ANY Key to CLOSE windows"
  147.     WHILE INKEY$ = "": WEND
  148.     RemoveWindow
  149.  
  150.     FOR WinNo = 11 TO 1 STEP -1
  151.         CloseWindow WinNo
  152.     NEXT
  153.  
  154.     CloseWindow NoticeWin
  155.  
  156.         MouseCursorOff
  157.     CLS
  158.     PRINT "Thanks for running me!"
  159.  
  160.